home *** CD-ROM | disk | FTP | other *** search
- on exitFrame
- global mnv, ppl, bltx, blty, bltsprite, bltwich, psila, fxpath, trgt, vppl, hppl, ypnt, xpnt
- strata()
- if (the keyCode > 122) and (getAt(mnv, 1) > 1) and (psila > 0) then
- x = the memberNum of sprite getAt(ppl, 1) + 1
- if ((the keyCode = 126) and (x = 36)) or ((the keyCode = 125) and (x = 24)) or ((the keyCode < 125) and (x = 12)) then
- x = x - 10
- end if
- set the member of sprite getAt(ppl, 1) to member(x, 1)
- case the keyCode of
- 123:
- he = -10
- 124:
- he = 10
- 125:
- ve = 6
- 126:
- ve = -6
- end case
- setAt(vppl, 1, getAt(vppl, 1) + ve)
- setAt(hppl, 1, getAt(hppl, 1) + he)
- set the locH of sprite getAt(ppl, 1) to the locH of sprite getAt(ppl, 1) + he
- set the locV of sprite getAt(ppl, 1) to the locV of sprite getAt(ppl, 1) + ve
- else
- if getAt(mnv, 1) > 10 then
- set the member of sprite getAt(ppl, 1) to member(43, 1)
- setAt(mnv, 1, 1)
- else
- if getAt(mnv, 1) > 1 then
- setAt(mnv, 1, getAt(mnv, 1) - 1)
- if getAt(mnv, 1) = 1 then
- case the memberNum of sprite getAt(ppl, 1) of
- 48:
- set the member of sprite getAt(ppl, 1) to member(44, 1)
- 42:
- set the member of sprite getAt(ppl, 1) to member(38, 1)
- 53:
- set the member of sprite getAt(ppl, 1) to member(49, 1)
- end case
- else
- x = the memberNum of sprite getAt(ppl, 1)
- set the member of sprite getAt(ppl, 1) to member(x + 1, 1)
- end if
- end if
- end if
- end if
- if count(blty) > 0 then
- repeat with i = 1 to count(blty)
- if getAt(bltx, i) <> 0 then
- set the locH of sprite getAt(bltsprite, i) to the locH of sprite getAt(bltsprite, i) + getAt(bltx, i)
- end if
- if getAt(blty, i) <> 0 then
- set the locV of sprite getAt(bltsprite, i) to the locV of sprite getAt(bltsprite, i) + getAt(blty, i)
- end if
- if sprite(getAt(bltsprite, i)).within(getAt(ppl, 1)) and (getAt(bltwich, i) = "bad") and (sprite(10).visible = 0) then
- set the loc of sprite getAt(bltsprite, i) to point(690, 490)
- deleteAt(bltx, i)
- deleteAt(bltsprite, i)
- deleteAt(blty, i)
- deleteAt(bltwich, i)
- psila = psila - 1
- set the member of sprite 20 to member(the memberNum of sprite 20 + 1, 1)
- if psila = 0 then
- sound playFile 1, fxpath & "madead.aif"
- set the keyDownScript to EMPTY
- set the keyUpScript to EMPTY
- set the member of sprite getAt(ppl, 1) to member(54, 1)
- updateStage()
- setAt(mnv, 1, 6)
- else
- sound playFile 1, fxpath & "mahit.aif"
- end if
- next repeat
- end if
- if not sprite(getAt(bltsprite, i)).within(66) then
- set the loc of sprite getAt(bltsprite, i) to point(690, 490)
- deleteAt(bltx, i)
- deleteAt(bltsprite, i)
- deleteAt(blty, i)
- deleteAt(bltwich, i)
- next repeat
- end if
- if getAt(bltwich, i) = "good" then
- repeat with w = 2 to count(vppl)
- if (getAt(vppl, w) < 1000) and sprite(getAt(bltsprite, i)).intersects(getAt(ppl, w)) and (getAt(trgt, w) <> "m") then
- set the loc of sprite getAt(bltsprite, i) to point(690, 490)
- deleteAt(bltx, i)
- deleteAt(bltsprite, i)
- deleteAt(blty, i)
- deleteAt(bltwich, i)
- if (the memberNum of sprite getAt(ppl, w) < 112) and (the memberNum of sprite getAt(ppl, w) > 92) then
- set the memberNum of sprite getAt(ppl, w) to 112
- else
- set the memberNum of sprite getAt(ppl, w) to 87
- end if
- sound playFile 1, fxpath & "badhit.aif"
- setAt(mnv, w, 6)
- setAt(trgt, w, "a")
- setAt(hppl, w, 1000 + w)
- w = count(vppl) + 1
- end if
- end repeat
- end if
- end repeat
- end if
- repeat with i = 2 to count(trgt)
- if getAt(trgt, i) <> "a" then
- if getAt(mnv, i) < 30 then
- if (getAt(trgt, i) = "s") or (getAt(trgt, i) = "b") or (getAt(trgt, i) = "r") then
- yr = the memberNum of sprite getAt(ppl, i) + 1
- case yr of
- 165:
- yr = 157
- 105:
- yr = 94
- 76:
- yr = 68
- end case
- if (getAt(vppl, i) <= getAt(ypnt, i)) and ((getAt(hppl, i) >= (getAt(xpnt, i) - 20)) and (getAt(hppl, i) <= (getAt(xpnt, i) + 20))) then
- if the memberNum of sprite getAt(ppl, i) < 76 then
- yr = 68
- else
- if the memberNum of sprite getAt(ppl, i) < 105 then
- yr = 105
- else
- if getAt(trgt, i) <> "r" then
- yr = 156
- end if
- end if
- end if
- end if
- set the member of sprite getAt(ppl, i) to member(yr, 1)
- if getAt(vppl, i) > getAt(ypnt, i) then
- set the locV of sprite getAt(ppl, i) to the locV of sprite getAt(ppl, i) - 4
- setAt(vppl, i, the locV of sprite getAt(ppl, i))
- else
- if getAt(vppl, i) <= (getAt(ypnt, i) - 10) then
- set the locV of sprite getAt(ppl, i) to the locV of sprite getAt(ppl, i) + 4
- setAt(vppl, i, the locV of sprite getAt(ppl, i))
- end if
- end if
- if getAt(hppl, i) < (getAt(xpnt, i) - 10) then
- set the locH of sprite getAt(ppl, i) to the locH of sprite getAt(ppl, i) + 7
- setAt(hppl, i, the locH of sprite getAt(ppl, i))
- else
- if getAt(hppl, i) >= (getAt(xpnt, i) + 10) then
- set the locH of sprite getAt(ppl, i) to the locH of sprite getAt(ppl, i) - 7
- setAt(hppl, i, the locH of sprite getAt(ppl, i))
- end if
- end if
- else
- if getAt(trgt, i) = "m" then
- setAt(mnv, i, getAt(mnv, i) - 1)
- if getAt(mnv, i) < 1 then
- sprite(getAt(ppl, i)).visible = 1
- end if
- end if
- end if
- else
- yr = the memberNum of sprite getAt(ppl, i) + 1
- set the member of sprite getAt(ppl, i) to member(yr, 1)
- setAt(mnv, i, getAt(mnv, i) - 1)
- if getAt(mnv, i) = 30 then
- if the memberNum of sprite getAt(ppl, i) < 81 then
- set the memberNum of sprite getAt(ppl, i) to 68
- setAt(mnv, i, 0)
- else
- if the memberNum of sprite getAt(ppl, i) < 87 then
- set the memberNum of sprite getAt(ppl, i) to 157
- setAt(mnv, i, 0)
- else
- if the memberNum of sprite getAt(ppl, i) < 112 then
- set the memberNum of sprite getAt(ppl, i) to 93
- setAt(mnv, i, 0)
- end if
- end if
- end if
- end if
- end if
- next repeat
- end if
- if getAt(mnv, i) > 1 then
- yr = the memberNum of sprite getAt(ppl, i) + 1
- set the member of sprite getAt(ppl, i) to member(yr, 1)
- setAt(mnv, i, getAt(mnv, i) - 1)
- end if
- end repeat
- end
-